<%@tag pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="consignum" tagdir="/WEB-INF/tags"%>
<%@attribute name="id"%>
<%@attribute name="styleClass"%>
<%@attribute name="style"%>
<%@attribute name="icon"%>
<%@attribute name="maxlength"%>
<%@attribute name="rendered" type="java.lang.Boolean"%>
<%@attribute name="loading" type="java.lang.Object"%>
<%@attribute name="execute"%>
<%@attribute name="update" %>
<%@attribute name="action" %>
<%@attribute name="conversation"%>
<%@attribute name="targetModal" required="false"%>
<%@attribute name="value" type="java.lang.Object"%>
<c:if test="${empty rendered or rendered eq true}">
	     
	     <c:if test="${not empty conversation}">
	     	<c:set var="actioCustom" value="${action}?cid=${conversation}" />
	 	 </c:if>
	 	 <c:if test="${empty conversation}">
	     	<c:set var="actioCustom" value="${action}" />
	 	 </c:if>
	     <a <c:if test="${not empty execute and not empty actioCustom and not empty update}">
	 	     href="javascript:void(0);"
		     onclick="javascript: submitAjax('${execute}','${actioCustom}','${update}','${loading}');" 
		  </c:if>
		  <c:if test="${not empty targetModal}">
		  	<consignum:renderedField field="data-toggle" defaultValue="modal" />
		  	<consignum:renderedField field="data-target" value="${targetModal}" />
		  </c:if>  
		<consignum:renderedField field="id" value="${id}" />
		<consignum:renderedField field="maxlength" value="${maxlength}" />
		<consignum:renderedField field="style" value="${style}" /> 
		<consignum:renderedField field="name" value="${id}" />
		<consignum:renderedField field="class" value="${styleClass}" defaultValue="btn bg-color-blue txt-color-white" /> 
		<consignum:renderedField field="title" value="${title}" />
		<consignum:renderedField field="value" value="${value}" /> 
		<consignum:renderedField field="lang" value="${tooltip}" />
		<consignum:renderedField field="style" value="${style}" defaultValue="float:left;margin-left: -14px; border-radius: 4px;margin-right: 20px;" /> >
	
	<i class="<c:out value="${icon}" default=" " />"> </i> <c:out
			value="${value}" />
 </a>
</c:if>
